<?php

class es_cookie 
{
static function is_set($name) {
return isset($_COOKIE[$name]);
}
static function get($name) {
$value   = $_COOKIE[$name];
return $value;
}
static function set($name,$value,$expire='',$path='',$domain='') {
$path = app_conf('COOKIE_PATH');
$domain = app_conf('DOMAIN_ROOT');
$expire =   !empty($expire)?get_gmtime()+$expire:0;
setcookie($name,$value,$expire,$path,$domain);
}
static function delete($name) {
es_cookie::set($name,'',0);
}
static function clear() {
unset($_COOKIE);
}
}

?>